package com.convert;

import com.http.News;
import com.module.NoticeEntity;

import java.util.ArrayList;
import java.util.List;

/**
 * version 1.0.0
 * 持久层到http层的封装模型转化
 * @author KKW
 * @date 2017/7/7.
 */
public class NewsConverter {

    public static List<News> convert(List<NoticeEntity> ls){
        ArrayList<News> als=new ArrayList<>(ls.size());
        for(NoticeEntity n:ls){
            News news=new News(n.getUserId(),n.getNotice());
            als.add(news);
        }
        return als;
    }
}
